package com.dsjwjj.wangjj.merchant.service.impl;

import com.dsjwjj.wangjj.merchant.mapper.MerchantMapper;
import com.dsjwjj.wangjj.merchant.params.MerchantRequestParams;
import com.dsjwjj.wangjj.merchant.pojo.Merchant;
import com.dsjwjj.wangjj.merchant.service.MerchantService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class MerchantServicelmpl implements MerchantService {
    @Resource
    private MerchantMapper merchantMapper;
    @Override
    public int addMerchant(MerchantRequestParams merchantRequestParams) {

        return merchantMapper.addMerchant(merchantRequestParams);
    }

    @Override
    public Merchant findMerchantByName(String mname) {
        return merchantMapper.findMerchantByName(mname);
    }

    @Override
    public Merchant login(MerchantRequestParams merchantRequestParams) {
        return merchantMapper.login(merchantRequestParams);
    }

    @Override
    public int updateMerchant(Merchant merchant) {
        return merchantMapper.updateMerchant(merchant);
    }
}
